import { routes } from '@/router/dynamic-routes'
import { router } from '@/router'
import { useAuth } from '@/stores/auth'
import { useSettings } from '@/stores/settings'
// todo 通常情况下，需对所有store进行重置
export function resetStore() {
  const authStore = useAuth()
  const settingStore = useSettings()
  authStore.$reset()
  settingStore.$reset()
  routes.forEach((item) => {
    router.removeRoute(item.name)
  })
  routes.length = 0
}
